<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Product Admin - Dashboard HTML Template</title>

    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap-theme.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,700">
    <!-- https://fonts.google.com/specimen/Roboto -->
    <link rel="stylesheet" href="css/fontawesome.min.css">
    <!-- https://fontawesome.com/ -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- https://getbootstrap.com/ -->
    <link rel="stylesheet" href="css/templatemo-style.css">

    <!--
	Product Admin CSS Template
	https://templatemo.com/tm-524-product-admin
	-->
</head>

<body id="reportsPage">
    <div class="" id="home">
        <nav class="navbar navbar-expand-xl">
            <div class="container h-100">
                <a class="navbar-brand" href="index.html">
                    <h1 class="tm-site-title mb-0">全球新型冠状病毒实时数据统计</h1>
                </a>
                <button class="navbar-toggler ml-auto mr-0" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                    aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <i class="fas fa-bars tm-nav-icon"></i>
                </button>

            </div>

        </nav>
        <div class="container">
            <div class="row">
                <div class="col">
                </div>
            </div>
            <br/>


            <form class="navbar-form navbar-left" role="search">
                <div class="form-group">
                    <input  type="text" id="reseach"  />
                    <button id="search-btn" type="button"  >搜索国家</button>
                </div>
            </form>





            <!-- row -->
            <div class="row tm-content-row">
                <div class="col-12 tm-block-col">
                    <div class="tm-bg-primary-dark tm-block tm-block-taller tm-block-scroll">

                        <table class="table">
                            <thead>
                                <tr>
                                    <th scope="col">地区</th>
                                    <th scope="col">国家</th>
                                    <th scope="col">总人数</th>
                                    <th scope="col">新增人数</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr th:each="item:${covid19Msg.covid19DataList}">
                                    <td th:text="${item!=null?item.state:''}">
                                        1
                                    </td>
                                    <td th:text="${item!=null?item.region:''}">
                                        TB - Monthly
                                    </td>
                                    <td th:text="${item!=null?item.latestTotalCases:''}">
                                        01/04/2012
                                    </td>
                                    <td th:text="${item!=null?item.diffFromDay:''}">
                                        Default
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <footer class="tm-footer row tm-mt-small">
            <div class="col-12 font-weight-light">
            </div>
        </footer>
    </div>

    <script src="js/mui.min.js"></script>
    <script src="js/jquery-3.3.1.min.js"></script>
    <!-- https://jquery.com/download/ -->
    <script src="js/moment.min.js"></script>
    <!-- https://momentjs.com/ -->
    <script src="js/Chart.min.js"></script>
    <!-- http://www.chartjs.org/docs/latest/ -->
    <script src="js/bootstrap.min.js"></script>
    <!-- https://getbootstrap.com/ -->
    <script src="js/tooplate-scripts.js"></script>

    <script>
        $(function () {

            $("#search-btn").click(function () {
                var region = $("#reseach").val();
                console.log(region)
                window.location.href = "/?region=" + region;
            })
        })
    </script>
</body>

</html>